package com.spring.learn.controller;


import com.spring.learn.domain.TbUser;
import com.spring.learn.service.UserClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/cf")
public class ConsumerFeignController {

    @Resource
    private UserClient userClient;

    @GetMapping("/{id}")
    public TbUser queryById(@PathVariable Long id){
        return userClient.queryById(id);
    }
}
